package com.elm.orderDetailet.mapper;



import com.elm.orderDetailet.pojo.OrderDetailet;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailetMapper {

    @Insert("insert into orderdetailet(orderId,foodId,quantity)" +
            " values (#{orderId},#{foodId},#{quantity})")
    void saveOrderDetailet(OrderDetailet orderDetailet);

    @Select("select * from orderdetailet where orderId=#{orderId}")
    List<OrderDetailet> getByOrderId(Integer orderId);


}
